import Layout from '@/views/layout/index'

// 商机
const nicheRouter = {
    path: '/niche',
    component: Layout,
    name: 'niche',
    meta: {
        title: '商机管理',
        icon: 'iconfont icon-shangji'
    },
    redirect: "/niche/manage",
    children: [{
        path: 'manage',
        name: 'nicheManage',
        component: () => import('@/views/niche/manage'),
        meta: {
            title: '商机管理',
            icon: 'iconfont icon-shangji',
            api: ['niche'],
            authority: ['list'],
        },
        checkedList: [],
        rights: [{
                value: 'list',
                label: '列表'
            },{
                value: 'create',
                label: '添加'
            },{
                value: 'details',
                label: '详情'
            },{
                value: 'edit',
                label: '编辑'
            },{
                value: 'delete',
                label: '删除'
            },{
                value: 'update_status',
                label: '关闭'
            },{
                value: 'add_contract',
                label: '生成合同'
            }]
    },{
      path: 'detail',
      name: 'nicheDetail',
      component: () => import('@/views/niche/detail'),
      hidden: true,
      meta: {
        title: '商机详情',
        api: ['niche'],
        authority: ['list', 'edit']
      }
    }]
}

export default nicheRouter